#include "wavedisplay.h"
#include "ui_wavedisplay.h"

WaveDisplay::WaveDisplay(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::waveDisplay)
{
    ui->setupUi(this);
}

WaveDisplay::~WaveDisplay()
{
    delete ui;
}


void WaveDisplay::setDisplayChannel(const DisplayChannel& displayChannel) {
    ui->chkboxRope0lma->setChecked(displayChannel.rope0lma);
    ui->chkboxRope0lf->setChecked(displayChannel.rope0lf);

    ui->chkboxRope1lma->setChecked(displayChannel.rope1lma);
    ui->chkboxRope1lf->setChecked(displayChannel.rope1lf);
    
    ui->chkboxRope2lma->setChecked(displayChannel.rope2lma);
    ui->chkboxRope2lf->setChecked(displayChannel.rope2lf);
    
    ui->chkboxRope3lma->setChecked(displayChannel.rope3lma);
    ui->chkboxRope3lf->setChecked(displayChannel.rope3lf);
}


DisplayChannel WaveDisplay::getDisplayChannel() {
    DisplayChannel displayChannel;

    displayChannel.rope0lma = ui->chkboxRope0lma->isChecked();
    displayChannel.rope0lf = ui->chkboxRope0lf->isChecked();

    displayChannel.rope1lma = ui->chkboxRope1lma->isChecked();
    displayChannel.rope1lf = ui->chkboxRope1lf->isChecked();

    displayChannel.rope2lma = ui->chkboxRope2lma->isChecked();
    displayChannel.rope2lf = ui->chkboxRope2lf->isChecked();

    displayChannel.rope3lma = ui->chkboxRope3lma->isChecked();
    displayChannel.rope3lf = ui->chkboxRope3lf->isChecked();

    return displayChannel;
}
